﻿using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using Net7Music_Api.BLL;
using Net7Music_Api.Model;
using Microsoft.AspNetCore.Cors;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace Net7Music_Api.Controllers
{
    [EnableCors("any")]
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SingerController : ControllerBase
    {
        // GET: api/<SingerController>
        [HttpGet]
        public List<Singer> GetSingers()
        {
            return SingersMnager.SingersALL();
        }

        // GET api/<SingerController>/5
        [HttpGet("{id}")]
        public string Get(int id)
        {
            return "value";
        }

        // POST api/<SingerController>
        [HttpPost]
        public void Post([FromBody] string value)
        {
        }

        // PUT api/<SingerController>/5
        [HttpPut("{id}")]
        public void Put(int id, [FromBody] string value)
        {
        }

        // DELETE api/<SingerController>/5
        [HttpDelete("{id}")]
        public void Delete(int id)
        {
        }
    }
}
